using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DeliciousTest
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
            this.Focus();
        }
        private string _username;
        private string _password;
        public string username()
        {
            return _username;
        }

        public string password()
        {
            return _password;
        }

        private void buttonLogin_Click(object sender, EventArgs e)
        {
            if (this.textBoxPassword.Text == "")
                MessageBox.Show("Please enter a password before attempting to login.", @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            if (this.textBoxUserName.Text == "")
                MessageBox.Show("Please enter a username before attempting to login.", @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            else
                _username = this.textBoxUserName.Text ;
            _password = this.textBoxPassword.Text ;
                this.Hide();
        }
    }
}